<template>
    <ul>
        <!-- <li>消息编号：{{$route.params.id}}</li>
        <li>消息标题：{{$route.params.title}}</li> -->

        <!-- Vue2之路由的props配置 -->
        <li>消息编号：{{id}}</li>
        <li>消息标题：{{title}}</li>
    </ul>
</template>

<script>
    export default {
        name: 'Detail',
        props: ['id', 'title'],
        mounted() {
            console.log('route:', this.$route);
        },
    }   
</script>

<style lang="css">

</style>